package com.lzw.service.impl;

import com.lzw.entity.User;
import com.lzw.mapper.UserMapper;
import com.lzw.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;

    @Override
    public User selectByUsername(String username) {
        return userMapper.selectByUsername(username);
    }

    @Override
    public int save(User user) {
        return userMapper.insert(user);
    }
}
